package com.yesido.moshi.moshi23.proxy.mycglib;

/**
 * @author yesido
 * @description
 * @date 2023-06-12 13:55
 * @Version 8.3
 */
public class TestCGLib {
    public static void main(String[] args) {
        //1.创建目标对象
        TeacherDao target = new TeacherDao();
        //2.获取到代理对象，并把被代理对象传递给代理对象
        TeacherDao proxyInstance = (TeacherDao)new ProxyCGFactory(target).getProxyInstance();
        //3.执行代理对象的方法	，触发intercept方法，从而实现对目标对象的调用
        proxyInstance.teach();
    }

}
